Use case: SDIO extended polling transfer ¶
Extended polling transfers use
HAL_SDIO_WriteExtended()
and
HAL_SDIO_ReadExtended()
in blocking mode. The APIs remain unchanged between
HAL1 and HAL2. For example, an SDIO Wi‑Fi device may expose multiple functions where
user_io_func_nbr
selects
the Wi‑Fi function; an extended transfer could then transfer a TCP/IP packet in the Wi‑Fi function.
Code Snippet
|
HAL1/HAL2 |
|---|
/* Write BufferSize bytes to function user_io_func_nbr
at address IoAddress using Extended polling */
if (HAL_SDIO_WriteExtended(&hsdio,
user_io_func_nbr,
Write_IoAddress,
Buffer_Tx,
BufferSize,
TimeoutMs) != HAL_OK)
{
Error_Handler();
}
/* Read BufferSize bytes from function user_io_func_nbr
at address IoAddress using Extended polling */
if (HAL_SDIO_ReadExtended(&hsdio,
user_io_func_nbr,
Read_IoAddress,
Buffer_Rx,
BufferSize,
TimeoutMs) != HAL_OK)
{
Error_Handler();
}
|